﻿<%@ Page Title="" Language="C#" MasterPageFile="~/PBOfficeMaster.master" AutoEventWireup="true"
    CodeFile="Sender.aspx.cs" Inherits="Message_Sender" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        .branchtop
        {
            margin: 10px 50px;
            text-align: left;
            font-size: 12px;
        }
        .lbBranch
        {
            font-size: 14px;
            font-weight: bold;
            background-image: url('../imges/daohangbeijing1.jpg');
            background-repeat: no-repeat;
            text-align: center;
            margin: 0;
            color: White;
            padding-top: 7px;
            height: 22px;
            width: 110px;
        }
        hr
        {
            margin-left: 50px;
            color: Blue;
            width: 804px;
        }
        .btnBranch
        {
            width: auto;
            height: 20px;
            background-color: #ccffff;
            border: 1px solid #000099;
            color: #000099;
        }
    </style>
    <script type="text/javascript">
        //        function check(cb) {
        //            var del = document.getElementsByTagName("input");
        //            if (cb.checked == true) {
        //                for (var i = 0; i < del.length; i++) {
        //                    del[i].checked = true;
        //                }

        //            } 
        //            if (cb.checked == false) {
        //                for (var i = 0; i < del.length; i++) {
        //                    del[i].checked =false;
        //                }
        //            }
        //        }
        function OpenMsg(width, height, msgid) {
            window.showModalDialog("OneMessage.aspx?mid=" + msgid, 'dialogWidth=' + width + 'px;dialogHeight=' + height + 'px;help:no;status:no')
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="width: 864px; font-size: 14px;">
        <div class="branchtop">
            <table>
                <tr>
                    <td>
                        当前位置
                    </td>
                    <td>
                        <div class="lbBranch">
                            已发送管理</div>
                    </td>
                </tr>
            </table>
        </div>
        <hr />
        <div style="margin-left: 50px; text-align: left;">
            <asp:CheckBox ID="cbAll" runat="server" Text="全选" AutoPostBack="True" OnCheckedChanged="cbAll_CheckedChanged" />
        </div>
        <div style="margin-left: 50px; font-size: 12px;">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="802px"
                Height="153px" DataKeyNames="MessageId" OnRowDataBound="GridView1_RowDataBound">
                <Columns>
                    <asp:TemplateField HeaderText="删除(√)">
                        <EditItemTemplate>
                            <asp:CheckBox ID="cbDelete" runat="server" />
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="cbDelete" runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="收件人">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox2" runat="server" Text='<%# GetToUserId( Eval("MessageId") ) %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label2" runat="server" Text='<%# GetToUserId( Eval("MessageId") ) %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="Title" HeaderText="主题" />
                    <asp:BoundField DataField="BeginTime" HeaderText="发送时间" />
                    <asp:TemplateField HeaderText="紧急程度">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Type.MessageTypeName") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("Type.MessageTypeName") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle BackColor="#64CCFF" ForeColor="White" Height="30px" />
                <RowStyle Height="20px" />
                <AlternatingRowStyle BackColor="#F6FBFF" />
            </asp:GridView>
        </div>
        <div style="text-align: left; margin: 5px 50px;">
            <asp:Button ID="btnDelete" CssClass="btnBranch" runat="server" Text="删除选定项" OnClick="btnDelete_Click" />&nbsp;&nbsp;
            <asp:Button ID="btnReturn" runat="server" CssClass="btnBranch" Text="返回" OnClick="btnReturn_Click" /></div>
    </div>
</asp:Content>
